<?php
/**
 *
 */
class Sx_test extends CI_Controller {

	public function index() {
		echo "{msg:nginx}";
	}

	public function login() {
		$this -> load -> view("test/login");
	}

	public function reg() {
		$this -> load -> view("test/reg");
	}

	public function key() {
		$this -> load -> view("test/key");
	}

	public function friend() {
		$this -> load -> view("test/friend");
	}

	public function testmsg() {
		$p = array("Msgok" => "444", "Msg_ppp" => "adasdas");
		print($this -> fengchaoclass -> showhckmsg("2", $p, "adsdad", TRUE));
	}

	public function showuser() {
		//$this -> load -> model("sx_friend_mod");
		$p = $this -> sx_useropen_mod -> userall("", "", "");
		$data['db'] = $p;
		$this -> load -> view("test/addfriend", $data);
	}

	/*显示个人详细信息*/
	public function geren($key = "", $sessionid = "") {
		//$p = $this -> sx_useropen_mod -> user_con($key, $sessionid, TRUE);
		//$data['db'] = $p;
		$this -> load -> view("test/showuser");

	}

	public function allfriend($key, $sessionid) {
		$p = array();
		$p['key'] = $key;
		$p['sess'] = $sessionid;
		$this -> load -> view("test/showallfriend", $p);
	}

	public function sf($key, $sessionid) {
		$p = array();
		$p['key'] = $key;
		$p['sess'] = $sessionid;
		$this -> load -> view("test/sf", $p);
	}

	public function zz() {
		$this -> load -> view("test/zz");
	}

	public function bind() {
		$this -> load -> view("test/bind");
	}

	public function htmlupload() {
		$this -> load -> view("test/htmlupload");
	}

	public function delfriend() {
		$this -> load -> view("test/delfriend");
	}

	public function time() {
		print_r(time());
	}

	public function addarticle($key, $sessionid) {
		$p = array();
		$p['key'] = $key;
		$p['sess'] = $sessionid;
		$this -> load -> view("test/addarticle", $p);
	}

	public function getindex($key, $sessionid) {
		$p = array();
		$p['key'] = $key;
		$p['sess'] = $sessionid;
		$this -> load -> view("test/getcomment", $p);
	}

	public function dubo() {
		$n = $this -> input -> post("c_name");
		$db = array("name_nima" => $n);
		print(json_encode($db));
	}

	public function map() {
		$this -> load -> view("test/map");
	}
	
	public function kaonidaye(){
		echo "<form action='".base_url()."sx_article/' method='post'>";
		echo "<input type='text' name='city'>";
		echo "<input type='text' name='cursor'>";
		echo "<input type='text' name='offset'>";
		echo "<input type='submit' name='action' value='getArticleindex'>";
		echo "</form>";
	}
    
    public function user748(){
        echo "<form action='".base_url()."sx_user/' method='post'>";
        echo "<input type='text' name='userid'>";
        echo "<input type='text' name='mobikey'>";
        echo "<input type='text' name='sessionid'>";
        echo "<input type='submit' name='action' value='show'>";
        echo "</form>";
    }

}
?>